﻿using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;

namespace M.Core.Utils
{
    public class Md5
    {
        public static string CreateMD5(string input)
        {
            using (var md5 = MD5.Create())
            {
                byte[] bytes = Encoding.UTF8.GetBytes(input);
                var md5String = Convert.ToBase64String(md5.ComputeHash(bytes));
                return md5String;
            }
        }
    }
}
